<!DOCTYPE html>
<html>

<head th:include="cultivateWeb/header :: culHeaderCss">
</head>

<body>
    <!-- 顶部导航 -->
    <header th:include="cultivateWeb/header :: header"></header>
    <link type="text/css" href="/css/cultivateWeb/style/recruit.css" rel="stylesheet">
    <div style="clear: both"></div>
    <div style="background-color: #f7f7f7;">
        <div class="container">
            <div class="row">
                <div style="height: 40px">
                    <p style="line-height: 40px">当前位置：<a href="/cultivate/homepage">首页</a> > <a
                            href="/cultivate/getRecruit">应聘就业</a> > 岗位详情</p>
                </div>
                <div>
                    <input type="hidden" th:value="${id}" id="id" />
                    <section style="background-color: white;width: 100%;padding:20px">
                        <div class="r_div_1">
                            <p>
                                <span class="r_div_2">浏览：<span
                                        id="ll"></span>人</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <span class="r_div_2">申请：<span id="sq"></span>人</span>
                            </p>

                            <p class="gw_name">
                                <span class="r_div_3" id="gw">市场营销</span>
                                <span class="r_div_4" id="gz"></span>
                            </p>
                            <p style="clear: both"></p>
                            <p>
                                <span class="r_div_5" id="fl"></span>
                            </p>
                            <hr style="color: #979a9e;" />
                            <p class="r_div_6" id="rs"></p>
                            <p class="r_div_6" id="dz"></p>
                            <p>
                                <input type="button" id="apply" onclick="apply()" class="r_btn" value="申请职位" />
                                <input type="button" style="display: none" id="applyed" class="r_btn" value="已申请" />
                            </p>
                        </div>
                    </section>

                    <section class="r_div_7" style="width: 100%;padding:0 20px">
                        <div class="r_div_1" style="margin:0">
                            <p class="r_div_8">职位描述</p>
                            <p class="r_div_9" id="js"></p>
                            <hr style="color: #979a9e;" />
                            <p class="r_div_8">机构介绍</p>
                            <p class="r_div_10" id="org"></p>
                            <p class="r_div_6">
                                <span style="color: #979a9e;" id="qy"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <span style="color: #979a9e;" id="gm"></span>
                            </p>
                            <p class="r_div_9" id="gsjs">
                            </p>
                        </div>
                        <div style="clear: both;margin-bottom: 150px"></div>
                    </section>
                </div>
            </div>
        </div>
    </div>

    <!-- footer ------------------------------------------------------- -->
    <div class="footer" th:include="cultivateWeb/header :: footer"></div>
</body>

<script>

    function apply() {
        ajaxToken("/jzApi/recruitment/addResume", "POST", { id: $("#id").val() }, function (r) {
            // console.log("r = " , r)
        });
    }

    $(function () {
        $.ajax({
            url: '/jzApi/recruitment/selJobDetails',
            data: {
                id: $("#id").val()
            },
            success: function (r) {
                if (r.code == 0) {
                    if (r.data.browseNumber == null) {
                        $("#ll").text(0);
                    } else {
                        $("#ll").text(r.data.browseNumber);
                    }
                    if (r.data.appNumber == null) {
                        $("#sq").text(0);
                    } else {
                        $("#sq").text(r.data.appNumber);
                    }
                    $("#gw").text(r.data.name);
                    $("#gz").text(r.data.salaryRange + "/月");
                    $("#fl").text(r.data.welfareInroduce);
                    $("#rs").text("招" + r.data.numbers + "人" + " |  学历要求：" + r.data.education + "  |  工作年限：" + r.data.workExperience);
                    $("#dz").text("地址：" + r.data.address);
                    $("#js").text(r.data.introduce);
                    $("#org").text(r.data.orgName);
                    if (r.data.staffSize != '' && r.data.staffSize != null) {
                        $("#gm").text("员工规模：" + r.data.staffSize + "人");
                    }
                    if (r.data.orgSize != '' && r.data.orgSize != null) {
                        $("#qy").text("企业规模：" + r.data.orgSize + "人");
                    }

                    $("#gsjs").text(r.data.orgIntroduce);
                } else {
                    layer.msg(r.msg);
                }
            }
        })
    })

</script>

</html>